<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>vue组件6</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 30%;
        }

        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app">
         <fa></fa>

    </div>
    <template id="fas">
       <p>父组件</p>
       <son></son>
    </template>
    <template id="sons">
        <p>子组件</p>
     </template>
    <script>
        const temp = {
            count: 0
        }
        const v_app = Vue.createApp({
            data() {
                return {

                }
            },
            components: {
                fa: {
                    template: "#fas",
                    components:{
                        son:{
                            template: "#sons",
                        }
                    }
                }
            }
        });

        v_app.mount("#app");
    </script>
</body>

</html>